import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class Test {
/*
 * Write asynchronous logger
 * Should support simpe patterns (Thread name, time format, logger name 
 * Should support a simple configuration (file name/console, buffer size etc)
 * Should have an SLF4J adapter
 * Should support several levels (debug, info, error)
 */
    
    private static final Logger logger = LoggerFactory.getLogger(Test.class);
    
    public static void main(String[] args) {
        loadLoggerProperties();
        System.out.println(System.getProperty("mylogger.file.name"));
        logger.info("bla bla");
        logger.info("asdgf");
    }
    
    public static void loadLoggerProperties() {
        FileInputStream fis = null;
        try {
            fis = new FileInputStream("src/main/resources/mylogger.properties");
            System.getProperties().load(fis);
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (fis != null) {
                try {
                    fis.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
        
    }
}
